package com.chuangshu.chuangshuteam.service;

import com.chuangshu.chuangshuteam.entity.TeamInvitation;
import com.chuangshu.chuangshuteam.entity.TeamMember;

import java.util.List;

/**
 * 团队邀请服务接口
 */
public interface TeamInvitationService {

    /**
     * 创建邀请
     */
    TeamInvitation createInvitation(Long inviterId, String inviteeOpenid, String inviteeName, String direction);

    /**
     * 接受邀请
     */
    TeamMember acceptInvitation(String inviteCode, Long userId);

    /**
     * 获取用户的邀请列表
     */
    List<TeamInvitation> getUserInvitations(Long userId);

    /**
     * 撤销邀请
     */
    boolean revokeInvitation(Long invitationId, Long userId);

    /**
     * 检查邀请是否有效
     */
    boolean isInvitationValid(String inviteCode);
}